package com.github.prontera.domain;

import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
//gitee.com/gn.service/spring-boot-cloud.git
import java.util.List;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.github.prontera.domain.enums.IssueTypeEnum;
import com.github.prontera.model.BasicDomain;
import com.github.prontera.security.EncodeUtil;

import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * 
 * i_issue_answer-问答
 *
 */
@ToString
@EqualsAndHashCode(callSuper = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler", "fieldHandler"}, ignoreUnknown = true)
public class IssueAnswer extends BasicDomain{

	private static final long serialVersionUID = 1L;
    
	/**
	 * 
	 */
	@ApiModelProperty(value = "type")
	private Integer type;
	/**
	 * 
	 */
	@ApiModelProperty(value = "问题客户")
    private Long issureClientId;
	/**
	 * 
	 */
	@ApiModelProperty(value = "视频所属客户")
    private Long clientId;
	/**
	 * 
	 */
	@ApiModelProperty(value = "问题ID")
    private Long issueId;
	/**
	 * 
	 */
	@ApiModelProperty(value = "问题")
    private String issue;
	/**
	 * 
	 */
	@ApiModelProperty(value = "")
	private String vid;
	/**
	 * 
	 */
	@ApiModelProperty(value = "视频截图")
    private String image;
	/**
	 * 
	 */
	@ApiModelProperty(value = "头像")
	@JsonIgnore
    private String headImage;
	/**
	 * 
	 */
	@ApiModelProperty(value = "视频地址")
    private String video;
	/**
	 * 状态: 0:待查看,1:已查看
	 */
	@ApiModelProperty(value = "状态: 0:待查看,1:已查看")
    private Integer status;
	/**
	 * 点赞次数
	 */
	@ApiModelProperty(value = "点赞次数")
    private Integer thumbsUpCount;
	/**
	 * 点赞/取消点赞
	 */
	@ApiModelProperty(value = "点赞/取消点赞")
	private Boolean hasThumbsUp;
	/**
	 * 查看次数
	 */
	@ApiModelProperty(value = "查看次数")
    private Integer viewCount;
	/**
	 * 分享次数
	 */
	@ApiModelProperty(value = "分享次数")
    private Integer shareCount;
	/**
	 * 
	 */
	@ApiModelProperty(value = "用户名")
    private String username;
	/**
	 * 总收入
	 */
	@ApiModelProperty(value = "总收入")
	private BigDecimal totalAmount;
	
	/**
	 * 红包价格
	 */
	@ApiModelProperty(value = "红包价格")
	private BigDecimal amount;
	
	/**
	 * 0:公开,1:隐私
	 */
	@ApiModelProperty(value = "0:公开,1:隐私")
	private IssueTypeEnum issueType;
	
	private Client client;
	
	/**
	 * 城市编码
	 */
	@ApiModelProperty(value = "城市编码")
    private String cityCode;
	/**
	 * 定位城市
	 */
	@ApiModelProperty(value = "定位城市")
    private String city;
	
	private List<Long> ids;
	
	@JsonIgnore
	private Boolean hasMyVideo;
	
	public Boolean getHasMyVideo() {
		return hasMyVideo;
	}

	public void setHasMyVideo(Boolean hasMyVideo) {
		this.hasMyVideo = hasMyVideo;
	}

	/**
	 * 是否购买过视频
	 */
	@ApiModelProperty(value = "是否购买过视频")
	private Boolean hasBuy;
	
    public Boolean getHasBuy() {
		return hasBuy;
	}

	public void setHasBuy(Boolean hasBuy) {
		this.hasBuy = hasBuy;
	}

	public Integer getShareCount() {
		return shareCount;
	}

	public void setShareCount(Integer shareCount) {
		this.shareCount = shareCount;
	}

	public Boolean getHasThumbsUp() {
		return hasThumbsUp;
	}

	public void setHasThumbsUp(Boolean hasThumbsUp) {
		this.hasThumbsUp = hasThumbsUp;
	}

	public String getCityCode() {
		return cityCode;
	}

	public void setCityCode(String cityCode) {
		this.cityCode = cityCode;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public IssueTypeEnum getIssueType() {
		return issueType;
	}

	public void setIssueType(IssueTypeEnum issueType) {
		this.issueType = issueType;
	}

	public BigDecimal getAmount() {
		return amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

    public List<Long> getIds() {
		return ids;
	}

	public void setIds(List<Long> ids) {
		this.ids = ids;
	}

	public Client getClient() {
		return client;
	}

	public void setClient(Client client) {
		this.client = client;
	}
	
    public IssueAnswer(){
    
    }
    
    public BigDecimal getTotalAmount() {
		return totalAmount;
	}

	public void setTotalAmount(BigDecimal totalAmount) {
		this.totalAmount = totalAmount;
	}

	/**
	 * @return the username
	 */
	public String getUsername() {
		return username;
	}

	/**
	 * @param username the username to set
	 */
	public void setUsername(String username) {
		this.username = username;
	}



	public Long getIssueId() {
		return issueId;
	}

	public void setIssueId(Long issueId) {
		this.issueId = issueId;
	}

	public String getVid() {
		return vid;
	}

	public void setVid(String vid) {
		this.vid = vid;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public String getHeadImage() {
		return headImage;
	}

	public void setHeadImage(String headImage) {
		this.headImage = headImage;
	}

	public Long getIssureClientId() {
        return this.issureClientId;
    }
    
    public void setIssureClientId(Long issureClientId) {
        this.issureClientId = issureClientId;
    }
    public Long getClientId() {
        return this.clientId;
    }
    
    public void setClientId(Long clientId) {
        this.clientId = clientId;
    }
    public String getIssue() {
        return this.issue;
    }
    public String getIssue_() {
    	if(issue!=null){
    		try {
    			return EncodeUtil.urlDecode(issue);
    		} catch (UnsupportedEncodingException e) {
    			e.printStackTrace();
    		}
    	}
		return null;
    }
    
    public void setIssue(String issue) {
        this.issue = issue;
    }
    public String getImage() {
        return this.image;
    }
    
    public void setImage(String image) {
        this.image = image;
    }
    public String getVideo() {
        return this.video;
    }
    
    public void setVideo(String video) {
        this.video = video;
    }
    public Integer getStatus() {
        return this.status;
    }
    
    public void setStatus(Integer status) {
        this.status = status;
    }
    public Integer getThumbsUpCount() {
        return this.thumbsUpCount;
    }
    
    public void setThumbsUpCount(Integer thumbsUpCount) {
        this.thumbsUpCount = thumbsUpCount;
    }
    public Integer getViewCount() {
        return this.viewCount;
    }
    
    public void setViewCount(Integer viewCount) {
        this.viewCount = viewCount;
    }
    
}
